-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(scripts): codegen cleanup #517
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smooth !
jest.spyOn(common, 'run').mockImplementation(() => { | ||
return Promise.resolve(mockedResolvedValue); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jest.spyOn(common, 'run').mockImplementation(() => { | |
return Promise.resolve(mockedResolvedValue); | |
}); | |
jest.spyOn(common, 'run').mockResolvedValue(mockedResolvedValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk why I did not managed to make it work at first so went with the non sugar implem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes it's because the mockedResolvedValue
variable changes and need to be reevaluated everytime, while mockResolvedValue
function only evaluate at the start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes make sense
🧭 What and Why
🎟 JIRA Ticket: -
Changes included:
Follow up of #513
It seems that the
cleanup
job is ran onmain
(https://github.com/algolia/api-clients-automation/runs/6507516796?check_suite_focus=true), so the comment ends up being wrong: #513 (comment)We now provide the current branch name directly from
HEAD_BRANCH
, so we can fallback to it if we are on main🧪 Test
CI :D